#ifndef DATAFLOW_DETAIL_NODEINPUTLINKDESCRIPTOR_H
#define DATAFLOW_DETAIL_NODEINPUTLINKDESCRIPTOR_H

#include "NodeLinkDescriptor.h"

namespace DataFlow
{

namespace Detail
{

class Node;

class NodeInputLinkDescriptor : public NodeLinkDescriptor
{
	public:

		typedef NodeLinkDescriptor      BaseType;
		typedef NodeInputLinkDescriptor ThisType;

		NodeInputLinkDescriptor(void) : sn(0) { ; }

		NodeInputLinkDescriptor(Node * sourceNode, int sourcePort, int targetPort, int capacity)
			: sn(0)
		{
			this->setup(sourceNode, sourcePort, targetPort, capacity);
		}

		void   setSourceNode (Node * n)       { this->sn = n;    }
		Node * sourceNode    (void)     const { return this->sn; }

		void setup(Node * sourceNode, int sourcePort, int targetPort, int capacity)
		{
			this->setSourceNode(sourceNode);
			BaseType::setup(sourcePort, targetPort, capacity);
		}

	protected:

		Node * sn;
};

}

}

#endif // DATAFLOW_DETAIL_NODEINPUTLINKDESCRIPTOR_H
